<script type="text/javascript" src="/public/demo/layer3.1.0/layer/layer.js"></script>
<script type="text/javascript">
	$("#join-us-submit").click(function(){
		var name=$("#join-name").val();if (name=='') {layer.alert('姓名不能为空');return false;}
			address=$("#join-address").val();//if (name=='') {layer.alert('姓名不能为空');return false;}
			tel=$("#join-tel").val();if(!(/^1[34578]\d{9}$/.test(tel))){ layer.alert('请填写正确手机号');return false;}
			//type=$("#join-type").val();if (type=='') {layer.alert('参数错误');return false;}
			//fid="{:isset($info.id)?$info['id']:''}";
			$.post('/join_us.html',{name:name,address:address,tel:tel},function(res){
				if (res.code==200) {
					$("#join-name").val('');$("#join-address").val('');$("#join-tel").val('');
					layer.msg(res.msg,{icon:1,time:1500});
				}else{
					layer.msg(res.msg,{icon:7,time:1500});
				}
			})
		/*}else{
			layer.msg('报名通道暂未开通!',{icon:7,time:1500});
		}*/
	})
</script>